import pandas as pd
import numpy as np

s = ({
    '语文':100,
    '数学':90,
    '英语':80,
    'python':130,
    'java':120,
    'c++':110,
})
s1 = pd.Series(s)
print(s1)

# 切片
# Series是一维数组
# 隐式切片：左闭右开
print("\n隐式切片：左闭右开")
print(s1[1:4])
print(s1.iloc[1:4])

# 显式切片：左闭右闭
print("\n显式切片：左闭右闭")
print(s1["数学":"java"])
print(s1.loc["数学":"java"])